package com.rk.section1;

public class ComedyCalculator extends PerformanceCalculator {
    public ComedyCalculator(Performance performance, Play play) {
        super(performance, play);
    }

    @Override
    public int volumeCreditsFor() {
        return super.volumeCreditsFor() + (int) Math.floor(performance.getAudience() / 5.0);
    }

    @Override
    public int amountFor() {
        return  performance.getAudience() > 20 ? 30000 + 800 * performance.getAudience() : 30000 +300 * performance.getAudience();
    }
}
